/**
 *
 */
package org.suren.littlebird.preferences;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IntegerFieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.suren.littlebird.Activator;

/**
 * @author suren
 * @since 2015-2-2
 */
public class SuRenLoggerPreferencePage extends FieldEditorPreferencePage
		implements IWorkbenchPreferencePage
{

	public SuRenLoggerPreferencePage()
	{
		super(GRID);
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
		setDescription("Little preference page implementation");
	}

	@Override
	protected void createFieldEditors()
	{
		Composite parent = getFieldEditorParent();

		addField(new StringFieldEditor(PreferenceConstants.P_LOGGER_BRIDGE_IP,
				"Bridge IP : ", parent));
		addField(new IntegerFieldEditor(PreferenceConstants.P_LOGGER_BRIDGE_PORT,
				"Bridge Port : ", parent));
		addField(new StringFieldEditor(PreferenceConstants.P_LOGGER_LAYOUT,
				"Logger Layout : ", parent));
		addField(new BooleanFieldEditor(PreferenceConstants.P_LOGGER_NO_BRIDGE_HIDDEN,
				"Hidden When No Bridge", parent));
		addField(new StringFieldEditor(PreferenceConstants.P_LOGGER_FILTER,
				"Filter : ", parent));
	}

	@Override
	public void init(IWorkbench arg0)
	{
	}

}
